import utils from "./common/utils";

var startWidth = "m_";
var url = window.location.pathname.split("/");
var num = url.length - 1;
var page = url[num];

if (page.indexOf(".html") == -1) {
    if(page) {
        url.push("scenes_game.html");
    } else {
        url[num] = "scenes_game.html";
    }
    
    window.location.href = url.join("/");
}
if (utils.isPC && page.indexOf(startWidth) == 0) {
    url[num] = page.substr(startWidth.length);
    window.location.href = url.join("/");
}

// if (!utils.isPC && page.indexOf(startWidth) != 0) {
//     url[num] = startWidth + url[num];
//     window.location.href = url.join("/");
// }